package ph.gov.marikina.mcsmtms.tests;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import java.util.List;

import org.junit.Assert;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import ph.gov.marikina.mcsmtms.constants.GlobalConstants.UserTypes;
import ph.gov.marikina.mcsmtms.dao.SettingsDAO;
import ph.gov.marikina.mcsmtms.dao.UserDAO;
import ph.gov.marikina.mcsmtms.domain.Settings;
import ph.gov.marikina.mcsmtms.domain.User;
import ph.gov.marikina.mcsmtms.domain.UserType;

public class SettingsDAOTest {
	/** The context. */
	private static ApplicationContext springContext = new ClassPathXmlApplicationContext(
			"spring/test-spring-config.xml");
	
	@Test
	public void getSettings() {
		SettingsDAO settingsDAO = (SettingsDAO) springContext.getBean("settingsDAO");
		
		Settings settings = settingsDAO.getSettings(1);
		
		assertNotNull(settings);
		assertNotNull(settings.getSystemDate());
		System.out.println(settings.getSystemDate());
	}
}
